package com.itheima.demo;

import javax.servlet.*;
import java.io.IOException;
import java.util.Date;

public class DemoServlet implements Servlet {
    @Override
    public void init(ServletConfig servletConfig) throws ServletException {

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
       // System.out.println(new Date()+"睡觉吧!!!");
        servletResponse.getWriter().write("id"+servletRequest.getRemoteAddr()+new Date());
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
